package org.elec.mac.service;

import org.elec.mac.entity.SysRoleAction;
import org.elec.mac.mapper.SysRoleActionMapper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description:实现类
 * @author 
 * @version 1.0
 * @created 
 */
@Service
public class SysRoleActionService extends BaseService<SysRoleAction, SysRoleActionMapper> implements InitializingBean {

	@Autowired
	private SysRoleActionMapper sysRoleActionMapper;
	
	public void afterPropertiesSet() throws Exception {
		this.setBaseMapper(sysRoleActionMapper);
	}

	/**
	 *
	 * @param param
	 */
	public void deleteSysRoleActionByRoleId(Map<String, Object> param) {
		sysRoleActionMapper.deleteSysRoleActionByRoleId(param);
	}

	/**
	 * 批量保存角色功能关联
	 * @param list
	 */
	public void insertRoleActionBatch(List<SysRoleAction> list) {
		sysRoleActionMapper.insertRoleActionBatch(list);
	}

}
